#include "device/ec800/AtNetworkMqttStateEC800.h"

AtNetworkMqttStateEC800::AtNetworkMqttStateEC800(AtNetworkMqttClient *client, AtNetworkDevice *device) {
  this->urcCmd = (GSM_STRING)MEM_ALLOC(MQTT_STATE_URC_SIZE);

  memset(this->urcCmd, 0, MQTT_STATE_URC_SIZE);

  this->client = client;
  this->device = device;
}

AtNetworkMqttStateEC800::~AtNetworkMqttStateEC800() {
  free(this->urcCmd);
};

/**
 * URC回调接口函数
 */
void AtNetworkMqttStateEC800::callback(void *param) {
  int err_code = this->device->streamGetInt(1);

  // TODO 需要根据错误码执行对应的操作
}